// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

using System;
using System.Collections.Generic;

namespace SnapObjects.Data.Odbc
{
    public class OdbcHanaSqlKeywords : SqlKeywords
    {
        private static readonly IDictionary<string, SqlKeywords> _sqlmembers
            = new Dictionary<string, SqlKeywords>(_members, StringComparer.OrdinalIgnoreCase);

        protected OdbcHanaSqlKeywords(string name) : base(name)
        {
        }

        protected override void Register(string name)
        {
            if (!_sqlmembers.ContainsKey(name))
            {
                _sqlmembers.Add(name, this);
            }

            _name = name;
        }

        public static new bool IsKeyword(string value)
        {
            return _sqlmembers.ContainsKey(value);
        }

        public static new SqlKeywords Parse(string value)
        {
            if (_sqlmembers.ContainsKey(value))
            {
                return _sqlmembers[value];
            }

            return NOTHING;
        }

        public static readonly OdbcHanaSqlKeywords BEFORE = new OdbcHanaSqlKeywords("BEFORE");
        public static readonly OdbcHanaSqlKeywords CONDITION = new OdbcHanaSqlKeywords("CONDITION");
        public static readonly OdbcHanaSqlKeywords CUBE = new OdbcHanaSqlKeywords("CUBE");
        public static readonly OdbcHanaSqlKeywords CURRENT_CONNECTION = new OdbcHanaSqlKeywords("CURRENT_CONNECTION");
        public static readonly OdbcHanaSqlKeywords CURRENT_TRANSACTION_ISOLATION_LEVEL = new OdbcHanaSqlKeywords("CURRENT_TRANSACTION_ISOLATION_LEVEL");
        public static readonly OdbcHanaSqlKeywords CURRENT_SCHEMA = new OdbcHanaSqlKeywords("CURRENT_CONNECTION");
        public static readonly OdbcHanaSqlKeywords CURRENT_UTCDATE = new OdbcHanaSqlKeywords("CURRENT_UTCDATE");
        public static readonly OdbcHanaSqlKeywords CURRENT_UTCTIME = new OdbcHanaSqlKeywords("CURRENT_UTCTIME");
        public static readonly OdbcHanaSqlKeywords CURRENT_UTCTIMESTAMP = new OdbcHanaSqlKeywords("CURRENT_UTCTIMESTAMP");
        public static readonly OdbcHanaSqlKeywords CURRVAL = new OdbcHanaSqlKeywords("CURRVAL");
        public static readonly OdbcHanaSqlKeywords ELSEIF = new OdbcHanaSqlKeywords("ELSEIF");
        public static readonly OdbcHanaSqlKeywords IF = new OdbcHanaSqlKeywords("IF");
        public static readonly OdbcHanaSqlKeywords INOUT = new OdbcHanaSqlKeywords("INOUT");
        public static readonly OdbcHanaSqlKeywords LIMIT = new OdbcHanaSqlKeywords("LIMIT");
        public static readonly OdbcHanaSqlKeywords LOOP = new OdbcHanaSqlKeywords("LOOP");
        public static readonly OdbcHanaSqlKeywords MINUS = new OdbcHanaSqlKeywords("MINUS");
        public static readonly OdbcHanaSqlKeywords NEXTVAL = new OdbcHanaSqlKeywords("NEXTVAL");
        public static readonly OdbcHanaSqlKeywords OUT = new OdbcHanaSqlKeywords("OUT");
        public static readonly OdbcHanaSqlKeywords RETURN = new OdbcHanaSqlKeywords("RETURN");
        public static readonly OdbcHanaSqlKeywords RETURNS = new OdbcHanaSqlKeywords("RETURNS");
        public static readonly OdbcHanaSqlKeywords REVERSE = new OdbcHanaSqlKeywords("REVERSE");
        public static readonly OdbcHanaSqlKeywords ROLLUP = new OdbcHanaSqlKeywords("ROLLUP");
        public static readonly OdbcHanaSqlKeywords ROWID = new OdbcHanaSqlKeywords("ROWID");
        public static readonly OdbcHanaSqlKeywords SQL = new OdbcHanaSqlKeywords("SQL");
        public static readonly OdbcHanaSqlKeywords START = new OdbcHanaSqlKeywords("START");
        public static readonly OdbcHanaSqlKeywords SYSUUID = new OdbcHanaSqlKeywords("SYSUUID");
        public static readonly OdbcHanaSqlKeywords TABLESAMPLE = new OdbcHanaSqlKeywords("TABLESAMPLE");
        public static readonly OdbcHanaSqlKeywords TOP = new OdbcHanaSqlKeywords("TOP");
        public static readonly OdbcHanaSqlKeywords UTCTIMESTAMP = new OdbcHanaSqlKeywords("UTCTIMESTAMP");
        public static readonly OdbcHanaSqlKeywords WHILE = new OdbcHanaSqlKeywords("WHILE");
    }
}
